package net.monare.mifss.evn;

import net.monare.mifss.admin.ui.comp.PropertyListUi;
import net.monare.mifss.admin.ui.comp.PropertyFieldUi;

import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

public class AddPropertyListener implements ClickListener {

	private static final long serialVersionUID = 1781719661486881171L;

	private PropertyListUi parent;

	private String keyWidth;
	private String valueWidth;

	public AddPropertyListener(PropertyListUi parent, String keyWidth, String valueWidth) {

		this.parent = parent;
		this.keyWidth = keyWidth;
		this.valueWidth = valueWidth;

	}

	public void buttonClick(ClickEvent event) {

		parent.addProperyUiField(new PropertyFieldUi(keyWidth, valueWidth));

	}

}
